﻿using ExampleService.Infrastructure;
using Leo.Common;
using WebApiClientCore.Attributes;

namespace ExampleService.APIContract
{
    /// <summary>
    /// 例子  
    /// </summary>
    [Contract]
    public interface IExampleService
    {
        [HttpGet("/api/user/{id}")]
        Task<FuncResult<User>> GetUserByIdAsync(long id);

        [HttpPost("/api/user")]
        Task<FuncResult<string>> AddUser([JsonContent] User user);

        [HttpPut("/api/user")]
        Task<FuncResult<string>> EditUser([JsonContent] User user);

        [HttpPatch("/api/user")]
        Task<FuncResult<string>> UpdateUser([JsonContent] User user);

        [HttpDelete("/api/user")]
        Task<FuncResult<string>> DeleteUsers(long id);
    }
}
